package com.topisv.tms.service;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.topisv.tms.entity.AlreadyDeductedOut;
import com.topisv.tms.repository.AlreadyDeductedOutDao;
import com.topisv.tms.service.base.BaseService;

@Component
@Transactional(readOnly = true)
public class AlreadyDeductedOutService extends BaseService {
	@Autowired
	private AlreadyDeductedOutDao adoDao;
	public AlreadyDeductedOut findByOutinstorageId(Long outinstorageId){
		return adoDao.findByOutinstorageId(outinstorageId);
	}
	
	public List<AlreadyDeductedOut> findByOutinstorageIds(Date startTime,Date endTime){
		return adoDao.findByOutinstorageIds(startTime,endTime);
	}
	@Transactional(readOnly = false)
	public void save(AlreadyDeductedOut ado) {
		adoDao.save(ado);
	}
}
